<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<p:dialog id="operatorRoleDialogId" header="Chi tiết operatorRole" widgetVar="operatorRoleDialog" showEffect="fade"
		hideEffect="fade" resizable="true" modal="true" appendToBody="true" maximizable="true">
		<h:form id="operatorRoleDetailFormId">
			<h:panelGrid id="operatorRolePanelGridId" columns="2" cellpadding="4">

				<f:facet name="header">
					<p:messages autoUpdate="true" />
				</f:facet>

				<h:outputText value="Operator" />
				<p:selectOneMenu value="#{operatorRoleView.selectedOperatorId}">
					<f:selectItem itemLabel="" itemValue="" />
					<f:selectItems var="o" value="#{operatorRoleView.operators}" itemLabel="#{o.user.username}" itemValue="#{o.id}" />
				</p:selectOneMenu>

				<h:outputText value="Profile" />
				<p:selectOneMenu value="#{operatorRoleView.selectedProfileId}">
					<f:selectItem itemLabel="" itemValue="" />
					<f:selectItems var="p" value="#{operatorRoleView.profiles}" itemLabel="#{p.name}" itemValue="#{p.id}" />
				</p:selectOneMenu>

				<h:outputText value="Ngày bắt đầu" />
				<p:calendar value="#{operatorRoleView.editedEntity.startDate}" />

				<h:outputText value="Ngày kết thúc" />
				<p:calendar value="#{operatorRoleView.editedEntity.endDate}" />

				<f:facet name="footer">
					<p:commandButton icon="ui-icon-disk" value="Save" action="#{operatorRoleView.saveOrUpdate}" process="@form"
						update=":operatorRoleListFormId:operatorRoleDataTableId, @form"
						oncomplete="if (!args.validationFailed) operatorRoleDialog.hide()">
					</p:commandButton>
					<p:commandButton icon="ui-icon-cancel" value="Cancel" immediate="true" onclick="operatorRoleDialog.hide()" />
				</f:facet>
			</h:panelGrid>

		</h:form>
	</p:dialog>

</ui:composition>